import { LOGIN } from '../constant'
// 初始化状态
const initialState = {
  userInfo: {
  //   oauth_token: "lCBLbWQGzC6a2sT1yuX82UC0k5zNaXPe",
  //   oauth_expire_time: "2020-09-23 21:23:24",
  //   user_id: 1322,
  //   username: "18988938574"
  }
}
export default function saveUserInfo (state = initialState, { type, payload }) {
  if ( type === LOGIN ) {
    state.userInfo = {...state.userInfo,...payload}
  }
  return state
}
